package com.qidian.buy.controller;

import com.qidian.buy.pojo.ItemSpecificationsEntry;
import com.qidian.buy.service.ItemSpecificationsEntryService;
import com.qidian.buy.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2023/9/8 11:05
 */
@RestController
@RequestMapping("/itemSpecificationsEntry")
public class ItemSpecificationsEntryController {
    @Autowired
    private ItemSpecificationsEntryService entryService;
    @PostMapping("/save")
    public QdResult save(@RequestBody ItemSpecificationsEntry entry){
        return entryService.save(entry);
    };

    @GetMapping("/queryByPage")
    public QdResult queryByPage(Long speId,@RequestParam(defaultValue = "1")int page,@RequestParam(defaultValue = "10")int limit){
        return entryService.queryByPage(speId,page,limit);
    }
}
